package com.nacos.temp3.client.service;

import com.nacos.temp3.client.fallback.MemberApiFallbackFactory;
import com.nacos.temp3.support.domain.Customer;
import com.nacos.temp3.support.response.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "potyun-member-service", path = "/api/member", fallbackFactory = MemberApiFallbackFactory.class, contextId = "memberApi")
public interface MemberApiClient {

    @GetMapping("/list")
    BaseResult<List<Customer>> customerList();

    @GetMapping("/get/{key}")
    BaseResult<Customer> get(@PathVariable("key") Object primaryKey);

}
